package com.zhehekeji.opsys.api.entity;

// Generated 2016-3-11 10:21:54 by Hibernate Tools 3.4.0.CR1

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TVoteRecord generated by hbm2java
 */
@Entity
@Table(name="t_vote_record")
public class TVoteRecord implements java.io.Serializable {

	/** 
	* @Fields serialVersionUID : TODO
	*/ 
	private static final long serialVersionUID = 7638051414233632407L;
	private Long id;
	private String userId;
	private TVoteGame tvoteGame;
	private String playerCode;
	private String playerName;
	private Integer votes;
	private Date createTime;
	private Long cpCode;
	private Integer userType;
	private Integer epgType;
	private String areaId;
	public TVoteRecord() {
	}
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID",length=20,nullable=false,unique=true)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	@Column(name="USER_ID",length=64,nullable=true)
	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	@ManyToOne(cascade=CascadeType.REFRESH,fetch=FetchType.EAGER,optional=true)
	@JoinColumn(name="VOTE_ID")
	public TVoteGame getTvoteGame() {
		return tvoteGame;
	}

	public void setTvoteGame(TVoteGame tvoteGame) {
		this.tvoteGame = tvoteGame;
	}
	@Column(name="PLAYER_CODE",length=64,nullable=true)
	public String getPlayerCode() {
		return this.playerCode;
	}

	public void setPlayerCode(String playerCode) {
		this.playerCode = playerCode;
	}
	@Column(name="PLAYER_NAME",length=128,nullable=true)
	public String getPlayerName() {
		return this.playerName;
	}

	public void setPlayerName(String playerName) {
		this.playerName = playerName;
	}
	@Column(name="VOTES",length=11,nullable=true)
	public Integer getVotes() {
		return this.votes;
	}

	public void setVotes(Integer votes) {
		this.votes = votes;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATE_TIME")
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name="CP_CODE",length=20,nullable=true)
	public Long getCpCode() {
		return cpCode;
	}
	public void setCpCode(Long cpCode) {
		this.cpCode = cpCode;
	}
	@Column(name="USER_TYPE",length=2,nullable=true)
	public Integer getUserType() {
		return userType;
	}
	public void setUserType(Integer userType) {
		this.userType = userType;
	}
	@Column(name="EPG_TYPE",length=2,nullable=true)
	public Integer getEpgType() {
		return epgType;
	}
	public void setEpgType(Integer epgType) {
		this.epgType = epgType;
	}
	@Column(name="AREA_ID",length=64,nullable=true)
	public String getAreaId() {
		return areaId;
	}
	public void setAreaId(String areaId) {
		this.areaId = areaId;
	}

}
